#include <iostream>
#include <signal.h>
#include <unistd.h>

using namespace std;

volatile int flag=0;

void handler(int signo)
{
    cout<<"I'm signal :"<<signo<<endl;
    flag=1;
}

int main()
{
    signal(SIGINT,handler);
    while(!flag) ;

    cout<<"end"<<endl;
    return 0;
}